package com.og.vas.pojo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableLogic;
import java.io.Serializable;

import com.og.vas.pojo.vo.VacInfoVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 
 * </p>
 *
 * @author xzy
 * @since 2022-01-11
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="VaccinaInfo对象", description="")
public class VaccinaInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键id")
      @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "接种者id")
    private Integer uid;

    @ApiModelProperty(value = "接种时间")
    private LocalDateTime date;


    @ApiModelProperty(value = "疫苗批号")
    private String lotNumber;

    @ApiModelProperty(value = "剂次")
    private Integer dose;

    @ApiModelProperty(value = "生产企业")
    private String manufacturer;

    @ApiModelProperty(value = "接种单位")
    private String clinic;

    @ApiModelProperty(value = "逻辑删除")
    @TableLogic
    private Integer isDeleted;

    @ApiModelProperty(value = "更新时间")
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;


    public VacInfoVO toVo(){
        VacInfoVO vo = new VacInfoVO();
        vo.setId(getId());
        vo.setLotNumber(getLotNumber());
        vo.setManufacturer(getManufacturer());
        vo.setDose(getDose());
        vo.setDate(date);
        vo.setClinic(getClinic());
        return vo;
    }


}
